package com.xiaoyu.base.serverpush;

import com.xiaoyu.base.serverpush.event.ServerPushBaseEvent;
import com.xiaoyu.base.serverpush.proxy.BaseServerEventProxy;

import in.srain.cube.request.JsonData;

public class ServerEventFactory {

    private static BaseServerEventProxy sProxy;

    public static void setProxy(BaseServerEventProxy proxy) {
        sProxy = proxy;
    }

    public static ServerPushBaseEvent createServerPushEvent(JsonData jsonData) {
        if (sProxy != null) {
            return sProxy.createServerPushEvent(jsonData);
        }
        return null;
    }
}
